home *** CD-ROM | disk | FTP | other *** search
/ Aminet 34 / Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso / Aminet / comm / misc / ViperDaemon.lha / ViperDaemon-Install / Install < prev    next >
Text File  |  1999-08-22  |  12KB  |  387 lines

  1.  
  2. ; *****************************************
  3. ; *                                       *
  4. ; *  ViperDaemon-Installationsskript      *
  5. ; *                                       *
  6. ; *  $VER: 0.1 (22.08.99) by J.Reinert    *
  7. ; *                                       *
  8. ; *****************************************
  9.  
  10.  
  11. ; *************************************************************************
  12. ; Definition der globalen Konstanten
  13. ; *************************************************************************
  14.  
  15. (set #liesmichtext     "Lies_mich.TXT")       ; Schlusswort
  16. (set #aiconname        "ViperDaemonStart")    ; Name Autostart-Icon
  17. (set #aiconsource      "daemon.noinfo")       ; Quellname Autostart-Icon
  18. (set #aicondest        "SYS:WBStartup")       ; Ziel für Autostart-Icon
  19. (set #doksource        "Docs")                ; Anleitungen
  20. (set #developersource  "Entwickler")          ; Entwickler-Infos
  21. (set #progssource      "Programme")           ; Programme
  22.  
  23. ; *************************************************************************
  24. ; Definition der deutschen Texte
  25. ; *************************************************************************
  26.  
  27. (set #askprgdirmsg "Bitte wählen Sie die 'ViperTools'-Schublade aus.")
  28.  
  29. (set #askprgdirhelp
  30.   (cat "Es ist sehr wichtig, dass Sie die Schublade auswählen, in der "
  31.        "sich das konfigurierte Programm 'ViperTools' befindet. "
  32.        "ViperDaemon verwendet die selbe Prefs-Datei wie ViperTools.\n\n"
  33.        "Falls Sie eine ältere Version per Autostart-Icon starten ließen, "
  34.        "wird der Pfad vermutlich schon stimmen"
  35.   )
  36. )
  37.  
  38. (set #askdeveloper
  39.   (cat "Wenn Sie Applikationen für ViperDaemon programmieren möchten, "
  40.        "können Sie die dafür notwendigen Informationen umkopieren. Für "
  41.        "ARexx- und Blitz-Programmierer sind Beispiele enthalten\n\n"
  42.        "Möchten Sie die Entwicklerinfos installieren?"
  43.   )
  44. )
  45.  
  46. (set #askdeveloperdirmsg "Wo soll die Entwickler-Schublade angelegt werden?")
  47.  
  48. (set #askdeveloperdirhelp
  49.   (cat "Die Entwicklerinfos beinhalten Informationen zu ARexx-Port "
  50.        "und Exec-Messageport sowie Beispiele in ARexx, BlitzBASIC und C. "
  51.   )
  52. )
  53.  
  54. (set #error_dtinstall1
  55.   (cat "\nAnscheinend haben Sie die falsche Schublade ausgewählt. "
  56.        "Starten Sie die Installation daher erneut.\n\n"
  57.        "Falls Sie 'ViperTools' noch nicht installiert haben, sollten Sie "
  58.        "dies jetzt nachholen"
  59.   )
  60. )
  61.  
  62. (set #error_dtinstall2
  63.   (cat "\nAnscheinend haben Sie das Programm 'ViperTools' noch "
  64.        "nicht konfiguriert (Prefs-Datei fehlt).\n\n"
  65.        "Starten Sie bitte erst ViperTools, setzen Sie die "
  66.        "Programmeinstellungen und speichern Sie diese. Danach "
  67.        "können Sie diese Installation erneut starten."
  68.   )
  69. )
  70.  
  71. (set #helpwbstartup
  72.   (cat "Da Sie ein Autostart-Icon installiert haben, ist es nicht "
  73.        "notwendig, daß Sie das Programm 'ViperDaemon' in der 'WBStartup' - Schublade "
  74.        "belassen. Entfernen Sie es bitte."
  75.   )
  76. )
  77.  
  78. (set #askwbstartup
  79.   (cat "Möchten Sie, daß 'ViperDaemon' bei jedem Rechnerstart "
  80.        "automatisch aktiviert wird ? \n\n"
  81.        "Wenn ja, wird im nächsten Schritt ein Projekt-Icon "
  82.        "in den \"WBStartup\"-Ordner Ihrer Boot-Disk kopiert\n\n"
  83.        "Wenn nein, bleibt ein eventuell vorhandenes Start-Icon erhalten."
  84.   )
  85. )
  86.  
  87. (set #aiconfail1
  88.   (cat "Es existiert keine 'WBStartup'-Schublade auf Ihrer SYS- "
  89.        "Partition. Wenn Sie 'ViperDaemon' bei jedem Rechnerstart "
  90.        "automatisch in Ihren Rechner laden möchten, wird diese unbedingt "
  91.        "benötigt.\n\nSoll eine Schublade erzeugt werden?"
  92.   )
  93. )
  94.  
  95. (set #aiconfail2
  96.   (cat "Leider existiert keine 'WBStartup'-Schublade auf Ihrer SYS- "
  97.        "Partition. Automatischer Programmstart ist daher leider nicht möglich."
  98.   )
  99. )
  100.  
  101. (set #askuserstartup
  102.   (cat "Wenn Sie das Programme 'ShowCounter' auch in "
  103.        "einem Shellfenster starten möchten, können Sie jetzt einen "
  104.        "Suchpfad eintragen lassen. Dazu wird Ihre "
  105.        "'User-Startup' verändert.\n\n"
  106.        "Soll die User-Startup geändert werden?"
  107.   )
  108.  
  109. (set #nodaemon
  110.   (cat "Aus irgend einem Grund wurde das Programm \"ViperDaemon\" nicht "
  111.        "umkopiert. Wiederholen Sie bitte den Installationsvorgang"
  112.   )
  113. )
  114.  
  115. ; *************************************************************************
  116. ; Beginn der Installation
  117. ; *************************************************************************
  118.  
  119. (complete 0)
  120.  
  121. (welcome)
  122.  
  123. ; *************************************************************************
  124. ; ViperTools-Pfad ermitteln, falls Icon in SYS:WBStart vorhanden ist
  125. ; *************************************************************************
  126.  
  127. (if (exists (tackon #aicondest "ViperDaemonStart.info"))
  128.   (
  129.     (iconinfo (dest (tackon #aicondest "ViperDaemonStart"))
  130.               (getdefaulttool "testdir")
  131.     )
  132.     (set @default-dest (pathonly testdir))
  133.   )
  134. )
  135.  
  136. ; *************************************************************************
  137. ; Zielverzeichnis auswählen lassen
  138. ; *************************************************************************
  139.  
  140. (set #destname
  141.   (askdir
  142.     (prompt  #askprgdirmsg)
  143.     (help    #askprgdirhelp)
  144.     (default @default-dest)
  145.   )
  146. )
  147.  
  148. (if (= #destname "")
  149.   (
  150.     (abort "Fehler bei Auswahl!")
  151.   )
  152. )
  153.  
  154. (set #icon_toolentry (tackon #destname "ViperDaemon"))
  155. (set #dokdest (tackon #destname "Docs"))
  156.  
  157. ; *************************************************************************
  158. ; ViperTools-Installation prüfen
  159. ; *************************************************************************
  160.  
  161. (if (exists (tackon #destname "ViperTools.wizard") (noreq))
  162.   (
  163.     (if (not (exists (tackon #destname "ViperTools.Prefs") (noreq)))
  164.       (abort #error_dtinstall2)
  165.     )
  166.   )
  167.   (
  168.     (abort #error_dtinstall1)
  169.   )
  170. )
  171.  
  172. (complete 5)
  173.  
  174. ; *************************************************************************
  175. ; Icon-Typ auswählen
  176. ; *************************************************************************
  177.  
  178. (set #icontyp
  179.   (askchoice (prompt "Wählen Sie einen Icon-Typ aus")
  180.              (help "")
  181.              (choices "Standard" "MagicWB")
  182.   )
  183. )
  184. (if (= #icontyp 0)
  185.   (
  186.     (set #iconsource #progssource)
  187.   )
  188.   (
  189.     (set #iconsource "MWBIcons")
  190.   )
  191. )
  192. (complete 10)
  193.  
  194.  
  195. ; *************************************************************************
  196. ; Falls vorhanden, alten ViperDaemon beenden
  197. ; *************************************************************************
  198.  
  199. (if (exists "ExitDaemon")
  200.   (
  201.     (run "ExitDaemon")
  202.     (if (exists "RAM:OldDaemon_Removed")
  203.       (
  204.         (message "Ihre aktive Version von ViperDaemon wurde soeben aus dem Speicher entfernt. Nach erfolgreicher Installation müssen Sie \"ViperDaemon\" neu starten.")
  205.         (delete "RAM:OldDaemon_Removed")
  206.       )
  207.     )
  208.   )
  209.   (
  210.     (message "Eine eventuell aktive Version von ViperDaemon müssen Sie zuerst beenden, bevor Sie weitermachen! Benutzen Sie dazu das Programm \"Exchange\" der Workbench.")
  211.   )
  212. )
  213.  
  214. ; *************************************************************************
  215. ; Kopieren der Programme
  216. ; *************************************************************************
  217.  
  218. (if (exists #progssource (noreq))
  219.   (
  220.     (copyfiles (prompt "Programme kopieren")
  221.                (source #progssource)
  222.                (dest #destname) 
  223.                (help "")
  224.                (pattern "~(#?.info)")
  225.                (confirm "EXPERT")
  226.     )
  227.   )
  228. )
  229. (complete 50)
  230.  
  231. ; *************************************************************************
  232. ; Kopieren der Anleitungen
  233. ; *************************************************************************
  234.  
  235. (if (exists #doksource)
  236.   (
  237.     (copyfiles (prompt "Anleitungen kopieren")
  238.                (source #doksource)
  239.                (dest #dokdest) 
  240.                (infos)
  241.                (help "")
  242.                (all)
  243.                (confirm "EXPERT")
  244.     )
  245.   )
  246. )
  247. (complete 55)
  248.  
  249. ; *************************************************************************
  250. ; Installieren des Autostart-Icons
  251. ; *************************************************************************
  252.  
  253. (if (exists #aiconsource)
  254.   (
  255.    (if (not (exists #aicondest))
  256.     (if (askbool (prompt #aiconfail1) (help "") (default 0) (choices "Ja" "Nein"))
  257.       (makedir #aicondest (infos))
  258.     )
  259.    )
  260.    (if (exists #aicondest)
  261.     (
  262.       (if (exists #icon_toolentry)
  263.         (
  264.           (if ((askbool (prompt #askwbstartup) (help "") (default 0) (choices "Ja" "Nein")))
  265.             (
  266.               (copyfiles (prompt  "Icon kopieren") (source  #aiconsource) (dest    #aicondest) (newname (cat #aiconname ".info")))
  267.  
  268. ; *************************************************************************
  269. ; Default-Tool und Tooltypes (Zukunft) eintragen
  270. ; *************************************************************************
  271.  
  272.               (set #newaiconname (tackon #aicondest #aiconname))
  273.  
  274.               (if (exists (cat #newaiconname ".info"))
  275.                 (
  276.                   (Tooltype (dest #newaiconname) (Setdefaulttool #icon_toolentry))
  277.                   (if (exists "SYS:WBStartup/ViperDaemon")
  278.                     (message #helpwbstartup)
  279.                   )
  280.                 )
  281.               )
  282.             )
  283.           )
  284.         )
  285.       )
  286.     )
  287.     (
  288.       (message #aiconfail2)
  289.     )
  290.    )
  291.   )
  292. )
  293. (complete 70)
  294.  
  295. ; *************************************************************************
  296. ; Entwicklerinformationen kopieren
  297. ; *************************************************************************
  298.  
  299. (if (exists #developersource)
  300.   (
  301.     (if (askbool (prompt #askdeveloper) (help "") (default 0) (choices "Ja" "Nein"))
  302.       (
  303.         (set developerpath (askdir (prompt  #askdeveloperdirmsg)
  304.                                    (help    #askdeveloperdirhelp)
  305.                                    (default @default-dest)
  306.                       )
  307.         )
  308.         (if (<> developerpath "")
  309.           (
  310.             
  311.             (set developerdir (tackon developerpath "VD-Entwickler"))
  312.             (makedir developerdir (infos))
  313.             (copyfiles (prompt "Entwicklerinfos kopieren")
  314.                        (source #developersource)
  315.                        (dest developerdir)
  316.                        (infos)
  317.                        (all)
  318.                        (help "")
  319.                        (confirm "EXPERT")
  320.             )
  321.           )
  322.         )
  323.       )
  324.     )
  325.   )
  326. )
  327.  
  328. (complete 80)
  329.  
  330. ; *************************************************************************
  331. ; Kopieren der Icons
  332. ; *************************************************************************
  333.  
  334. (working "Icons kopieren...")
  335.  
  336. (run (cat "IconCopy " ("ARexx/Counter2TCalc.VDaemon") " " (tackon #destname "/ARexx/Counter2TCalc.VDaemon") " UPDATE"))
  337. (run (cat "IconCopy " (tackon #iconsource "ViperDaemon") " " (tackon #destname "ViperDaemon") " UPDATE"))
  338. (run (cat "IconCopy " (tackon #iconsource "ShowCounter") " " (tackon #destname "ShowCounter") " UPDATE"))
  339. (run (cat "IconCopy " (tackon #iconsource "Docs") " " (tackon #destname "Docs") " UPDATE"))
  340. (complete 85)
  341.  
  342. ; *************************************************************************
  343. ; Suchpfad in User-Startup einbinden
  344. ; *************************************************************************
  345.  
  346. (if (askbool (prompt #askuserstartup) (help "") (default 0) (choices "Ja" "Nein"))
  347.   (
  348.     (set cmd (cat "Path "#destname" add"))
  349.     (startup "ViperDaemon-Tools" 
  350.              (prompt (cat "Zeile '" cmd "'in User-Startup einfügen"))
  351.              (command cmd)
  352.              (help "")
  353.     )
  354.   )
  355. )
  356.  
  357. (complete 90)
  358.  
  359. ; *************************************************************************
  360. ; Falls vorhanden, einen LiesMich-Text anzeigen
  361. ; *************************************************************************
  362.  
  363. (if (exists #liesmichtext)
  364.   (run (cat "sys:utilities/Multiview " #liesmichtext))
  365. )
  366.  
  367. ; *************************************************************************
  368. ; Aktuelles Verzeichnis setzen
  369. ; *************************************************************************
  370.  
  371. (if (exists (tackon #destname "ViperDaemon"))
  372.   (
  373.     (set @default-dest #destname)
  374.   )
  375.   (
  376.     (message #nodaemon)
  377.     (set @default-dest "")
  378.   )
  379. )
  380. (complete 100)
  381.  
  382. ; *************************************************************************
  383. ; Ende der Installation
  384. ; *************************************************************************
  385.  
  386.